package com.yzd.netmonitor.service.base;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.yzd.netmonitor.dao.base.MyBatisBaseDao;
import com.yzd.netmonitor.page.PageDataBean;

public interface MyBatisBaseService<T extends Serializable, PK extends Serializable, DAO extends MyBatisBaseDao<T, PK>> {

	public void save(T entity);

	public void update(T entity);

	public void saveOrUpdate(T entity);

	public void saveOrUpdateBatch(List<T> list);

	public T get(PK id);
	
	public List<T> getAll(PK id);

	public void batchExecute(final List<T> list, final int batchSize);

	public List<T> find(Map<String, Object> params);

	public PageDataBean<T> findPageDataBean(Map<String, Object> params, int pageNum, int pageSize, String orderField, String orderType);

	public void deleteById(PK[] ids);

	
}
